package com.softeem.music_sys.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.softeem.music_sys.comm.Result;
import com.softeem.music_sys.entity.Playlist;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author RD
* @description 针对表【playlist(歌单信息表)】的数据库操作Service
* @createDate 2025-11-07 11:19:17
*/
public interface PlaylistService extends IService<Playlist> {

    /**
     * 添加歌单
     */
    Result addPlaylist(Playlist playlist);

    /**
     * 根据ID获取歌单
     */
    Result getPlaylistById(Integer id);

    /**
     * 更新歌单
     */
    Result updatePlaylist(Playlist playlist);

    /**
     * 删除歌单
     */
    Result deletePlaylist(Integer id);

    /**
     * 获取歌单列表
     */
    Page<Playlist> getPlaylistList(Integer page, Integer limit);

    /**
     * 根据用户ID获取歌单
     */
    Page<Playlist> getPlaylistsByUser(Integer userId, Integer page, Integer limit);

    /**
     * 搜索歌单
     */
    Page<Playlist> searchPlaylists(String keyword, Integer page, Integer limit);

    /**
     * 获取最新歌单
     */
    Page<Playlist> getNewPlaylists(Integer page, Integer limit);
}